Skip to main content

choose

Type

command

Summary

Selects a tool or paint tool.

Syntax

choose <toolName> tool

Description

Use the choose command to select objects, create objects, or paint under scripted control.

The tool you choose is effective for all editable windows, until you choose another tool. (The Browse tool is always in effect for stacks whose cantModify property is true, and for stacks being displayed as a palette, modeless dialog, or modal dialog.)

All types of graphics are drawn with the single Graphic tool. To draw a specific shape, first draw with the Graphic tool, then set the style property of the new graphic to the shape you want. (You can also set the style of the templateGraphic to the shape you want, then draw the graphic with the Graphic tool. The graphic icons on the Tools palette work this way: each one sets the style of the templateGraphic, then chooses the Graphic tool.)

Similarly, all types of buttons, fields, and scrollbars can be drawn with the single tool for that object type. You specify a particular kind of button, field, or scrollbar by setting its style property.

note

You must choose tools by name. The HyperCard method of choosing tools by number is not supported in LiveCode.

Parameters

NameTypeDescription

toolName

enum

Examples

choose browse tool
choose tSavedTool tool

function: selectedImage, tool, stacks

glossary: property, select, command, tool, HyperCard, control, modal dialog box, modeless dialog box, paint tool, object

keyword: browse, button, bucket, eraser, brush, curve, dropper, graphic, field, templateGraphic

message: selectedObjectChanged, newTool

property: spray, penPattern, brushPattern, style, tool, paintCompression, magnify, selected, polySides, lineSize

command: select, palette, topLevel, reset cursors, rotate, drag, flip, click

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?